package sg.edu.nus.iss.team8s.vmcs.commons;
import java.awt.Button;
import java.awt.Color;
import java.awt.Font;
import java.awt.Label;

public class CommonsFactory {
	
	private static CommonsFactory factory=null;
	
	public static CommonsFactory getInstance()
	{
		if(factory==null)
			factory = new CommonsFactory();
		
		return factory;
	}
	
	public Button getButton(int type, String text)
	{
		Button button=new Button(text);
		switch(type)
		{
			case 1:
				button.setSize(100, 25);
				break;
			case 0:
				button.setSize(60, 40);
				button.setBackground(Color.WHITE);
				//button.setForeground(Color.WHITE);
				button.setFont(new Font("Times New Roman", Font.BOLD, 12));
				break;
			case 9:
				button.setSize(150, 30);
				break;
		}
		return button;
	}
	public Label getLabel(int type, String text)
	{
		Label label=new Label(text);
		switch(type)
		{
			case 2:
				label.setSize(100, 25);
				label.setBackground(Color.WHITE);
				break;
			case 3:
				label.setSize(100, 25);
				label.setBackground(Color.RED);
				break;
			case 4:
				label.setSize(50, 25);
				label.setBackground(Color.BLACK);
				break;
			case 5:
				label.setSize(40, 25);
				label.setBackground(Color.BLACK);
				break;
			case 6:
				label.setSize(80, 25);
				break;
			case 7:
				label.setSize(300, 50);
				break;
			case 8:
				label.setSize(100, 25);
				label.setBackground(Color.GREEN);
				break;
		}
		return label;
	}
}
